package com.rhaggarty.blackjack.cardroom;

import java.math.BigDecimal;

import com.rhaggarty.blackjack.game.GameResult;
import com.rhaggarty.blackjack.game.Hand;
import com.rhaggarty.blackjack.game.Player;

/**
 * A representation of a Blackjack dealer.
 *
 * @see {@link SinglePlayerDealer}
 * 
 * @author Ryan Haggarty (ryanmh@gmail.com)
 *
 */
public interface Dealer {

    /**
     * Instructs the dealer to give the seat in question another card.
     * 
     */
    GameResult hit();
    
    /**
     * Instructs the dealer in question to end the round for the current seat and play out the dealer cards.
     * 
     */
    GameResult stand();
    
    /**
     * Instructs the dealer that the player would like to double down.  The player should be charged the amount originally wagered,
     * and will only get a single additional card.
     * 
     */
    GameResult doubleDown();
    
    /**
     * The player in question would like to split their pair and play them in individual silos.
     * 
     */
    GameResult split();
    
    /**
     * The player in question would like to buy insurance.  The cost is one half the bet, and will allow them to get their wager
     * back if the dealer has blackjack.  This will only be offered if the dealer is showing an ace.
     * 
     */
    GameResult buyInsurance();
    
    /**
     * This initiates a round, and will be followed by two face up cards dealt to the player in question.
     * 
     */
    GameResult bet(BigDecimal amount);
    
    /**
     * A new player has requested to sit at an empty seat.
     * 
     */
    Seat sitPlayer(Player player);
 
    /**
     * Returns the hand currently held by the dealer.  Note that only showing cards will be included in the returned hand (not the face down card).
     * 
     */
    Hand getDealerHand();
}
